vulkan: Start rework on shaders to allow antialiased drawing
authorBenjamin Otte <otte@redhat.com>
Sat, 6 May 2023 23:06:52 +0000 (01:06 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 4 Jun 2023 17:42:00 +0000 (19:42 +0200)
commit64bcdb713c3769e663fb325b429d39a69bf1d0a4
tree751d7523f4b5c71185508623e1f393f30b004189
parent4a868736f93152b12965fd031f10b8483db82d36
vulkan: Start rework on shaders to allow antialiased drawing

This introduces the rect object and adds a rect_distance() and
rect_coverage() function.

_distance() returns the signed distance tp the rectangle.
_coverage() returns the coverage of a pixel centered at that position.

Note that the pixel size is computed using dFdx/dFdy.
gsk/vulkan/resources/clip.vert.glsl
gsk/vulkan/resources/color.frag
gsk/vulkan/resources/color.vert
gsk/vulkan/resources/meson.build
gsk/vulkan/resources/rect.frag.glsl [new file with mode: 0644]
gsk/vulkan/resources/rect.glsl [new file with mode: 0644]
gsk/vulkan/resources/rect.vert.glsl [new file with mode: 0644]